﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;

using ZFB.Common;

namespace ZFB.IServices
{
    public interface ISettingServices
    {
        /// <summary>
        /// 设置配置项name的值为valuer
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        Task<ApiResult> SetValueAsnyc(string name, string value);
        /// <summary>
        /// 获取配置项name的值
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        Task<ApiResult> GetValueAsnyc(String name);//GetValue("SmtpServer")
        /// <summary>
        /// 设置int类型value
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        Task<ApiResult> SetValueAsnyc(string name, int value);
        /// <summary>
        /// 获取int类型value
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        Task<ApiResult> GetlntValueAsnyc(string name);
        /// <summary>
        /// 设置bool类型value
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        Task<ApiResult> SetValueAsnyc(string name, bool value);
        /// <summary>
        /// 获取bool类型value
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        Task<ApiResult> GetBoolValueAsnyc(string name);
        /// <summary>
        /// 获取所有配置项
        /// </summary>
        /// <returns></returns>
        Task<ApiResult> GetAllAsnyc();
    }
}
